using System;
using System.Collections.Generic;
using System.Text;

using Presentation.Contracts;
using Task.Contracts;
using Task;
using DataAccess;
using Globals;


namespace Presentation
	{
	/// <summary>
	/// Add Forum Presenter.
	/// </summary>
	public sealed class ForumPresenter
		{
		#region Members

		/// <summary>
		/// Instance of view.
		/// </summary>
		private IForumView view;

		/// <summary>
		/// Simple galleryTask.
		/// </summary>
		private IForumTask task;

		#endregion Members

		#region Construction/Finalization

		/// <summary>
		/// Initializes a new instance of the <see cref="AddForumPresenter"/> class.
		/// </summary>
		/// <param name="view">The view.</param>
		public ForumPresenter(IForumView view)
			{
			this.view = view;
			task = new ForumTask();
			}

		#endregion Construction/Finalization

		#region Public Methods

		/// <summary>
		/// Initializes view.
		/// </summary>
		public void Initialize()
			{
			List<comment> tmpList = task.GetComments(view.ForumID,view.CommentsStartIndex,25);
				//view.ShowComments(tudatatable);
			//view.ShowComments(task.GetComments(3,1,3));
			}

		/// <summary>
		/// Adds the new forum.
		/// </summary>
		public void PageComments()
			{
			view.PageComments(25, task.GetCommentsCount(view.ForumID));
			}


		#endregion Private Methods
		}
	}
